<!--
 * @Descripttion: 纵向进度跟踪
 * @version:
 * @Author: lehaixia
 * @Date: 2022-10-28 13:23:44
 * @LastEditors: lehaixia
 * @LastEditTime: 2022-12-23 16:44:38
-->
<template>
  <div class="page-container">
    <van-steps :active="active" active-color="#16BC83" direction="vertical" class="steps">
      <van-step v-for="v in dictData" :key="v.id">
        <template v-slot:finish-icon>
          <van-icon :name="stepFinish" class="finish-class" />
        </template>
        <template v-slot:active-icon>
          <van-icon name="" class="active-class" />
        </template>
        <div class="title mb3"> {{ v.dictName }}</div>
        <p class="desc mb3"> {{ v.time }}</p>
        <p class="desc">{{ v.desc }}</p>
      </van-step>
    </van-steps>
  </div>
</template>
<script>
import stepFinish from '@/assets/category/step-finish.png'

export default {
  name: 'CustomerAdd',
  components: {

  },
  props: {
    title: {
      type: String,
      default: ''
    },
    active: {
      type: Number,
      default: 0
    },
    dictData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      stepFinish
    }
  },
  async created() {

  },
  methods: {

  }
}
</script>
<style lang="less" scoped>
.page-container {
  padding: 24px 20px;
  .steps {
    // padding-top: 25px;
    // padding-bottom: 30px;
    background:#F8F8FA;
    .title {
      font-size: 12px;
      font-weight: 500;
      color: #333333;
      line-height: 17px;
    }
    .desc {
      font-size: 10px;
      font-weight: 400;
      color: #A8B0C5;
      line-height: 14px;
    }
    .mb3 {
      margin-bottom: 3px;
    }

    /deep/ .van-step--process {
      .active-class {
        width: 11px;
        height: 11px;
        background: #16BC83;
        box-shadow: 0px 2px 6px 0px rgba(10,159,156,0.19);
        border-radius: 9px;
      }
      .title {
        color: #16BC83;
        font-weight: 600;
      }
    }

    /deep/ .van-step--finish {
      .van-step__line {
        border-color:  #16BC83 !important;
        background: #fff !important;
      }

      .finish-class {
        width: 32px;
        height: 18px;
        background: #16BC83;
        box-shadow: 0px 2px 6px 0px rgba(10,159,156,0.19);
        border-radius: 9px;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .title {
        color: #16BC83;
        font-weight: 600;
      }
    }

    /deep/ .van-step__circle {
      width: 11px;
      height: 11px;
      background: #A8B0C5;
      box-shadow: 0px 2px 6px 0px rgba(168,176,197,0.19);
      border-radius: 9px;
    }

    /deep/ .van-step {
      .van-step__line {
        width: 0px;
        border-right: 2px dashed #A8B0C5;
        background: #fff !important;
        left: -16px;
      }
      &:nth-last-of-type(1) .van-step__line {
        border: none;
      }
    }

    /deep/ .van-step--vertical {
      padding: 11px 5px 0px 19px;
    }

    /deep/ .van-step--vertical:not(:last-child)::after {
      border: none;
    }
  }
}
</style>
